package com.turtle3d.user.grammars;

import com.turtle3d.formallanguage.grammar.Grammar;
import com.turtle3d.formallanguage.parser.SimpleParser;
import com.turtle3d.formallanguage.symbol.SymbolFactory;
import com.turtle3d.formallanguage.symbol.Symbol;

public class Hilbert extends Grammar
{

	@Override
	public void define()
	{
		
		setAxiom(SymbolFactory.getSymbolFactory().createSymbolofClass("A"));
		addProduction(SimpleParser.parseProduction("A->B-F+CFC+F-D\\F/D-F+\\\\CFC+F+B>>"));
		addProduction(SimpleParser.parseProduction("B->A\\F/CFB/F/D//-F-D/|F/B|FC/F/A>>"));
		addProduction(SimpleParser.parseProduction("C->|D/|F/B-F+C/F/A\\\\FA\\F/C+F+B/F/D>>"));
		addProduction(SimpleParser.parseProduction("D->|CFB-F+B|FA\\F/A\\\\FB-F+B|FC>>"));	
		
		/*addProduction(SimpleParser.parseProduction("A->B-F+CFC+F-D&F^D-F+&&CFC+F+B//"));
		addProduction(SimpleParser.parseProduction("B->A&F^CFB^F^D^^-F-D^|F^B|FC^F^A//"));
		addProduction(SimpleParser.parseProduction("C->|D^|F^B-F+C^F^A&&FA&F^C+F+B^F^D//"));
		addProduction(SimpleParser.parseProduction("D->|CFB-F+B|FA&F^A&&FB-F+B|FC//"));*/	
		
	}
	
	public void setRequiredParameters(){
		setRequiredParameter(Symbol.TURN_ANGLE, 90f);
		setRequiredParameter(Symbol.ROLL_ANGLE, 90f);
		setRequiredParameter(Symbol.PITCH_ANGLE, 90f);
	}

}
